package org.blankie.model.soft;

import java.io.Serializable;

import org.blankie.lang.Validate;
import org.blankie.lang.ValidationMode;

public class Blankie implements Serializable {

    private static final long serialVersionUID = 0L;

    private MavenId mavenId;

    private SoftwareRelease release;

    private SoftwareTier tier;

    Blankie() {
        super();
    }

    public MavenId getMavenId() {
        assert mavenId != null;
        return mavenId;
    }

    public SoftwareRelease getRelease() {
        assert release != null;
        return release;
    }

    public SoftwareTier getTier() {
        assert tier != null;
        return tier;
    }

    protected void init() {
        assert release != null && tier != null;
        
        if (release.isBeta()) {
            Validate.setMode(ValidationMode.BUG_AWARE);
        }
    }

    void setMavenId(MavenId mavenId) {
        assert mavenId != null;
        this.mavenId = mavenId;
    }

    void setRelease(SoftwareRelease release) {
        assert release != null;
        this.release = release;
    }

    void setTier(SoftwareTier tier) {
        assert tier != null;
        this.tier = tier;
    }

}
